<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>小米商城右下角浮动</title>
  </head>
  <style>
    body {
      background-color: #ddd;
      margin: 0;
    }
    ul,
    p {
      margin: 0;
      padding: 0;
      list-style: none;
    }
    a {
      text-decoration: none;
    }
    .sidebar {
      position: fixed;
      right: 20px;
      bottom: 100px;
      width: 85px;
      height: 500px;
    }
    .sidebar ul li {
      width: 85px;
      background-color: #fff;
      text-align: center;
      position: relative;
      border: 1px solid #f5f5f5;
    }
    .sidebar ul li p {
      padding-bottom: 10px;
      font-size: 14px;
      color: #757575;
    }
    .icon img {
      width: 30px;
      height: 30px;
      padding: 10px 0;
      transition: opacity .3s;
    }
    .sidebar ul li :hover p {
      color: #ff6700;
    }
    .sidebar ul li :hover .hover {
      display: inline-block;
    }
    .hover {
      display: none;
    }
    .sidebar ul li :hover .static {
      display: none;
    }
  </style>
  <body>
    <div class="sidebar">
      <ul>
        <li>
          <a href="">
            <div class="icon">
              <img
                src="https://i8.mifile.cn/b2c-mimall-media/98a23aae70f25798192693f21c4d4039.png"
                class="static"
              /><img
                src="https://i8.mifile.cn/b2c-mimall-media/74c4fcb4475af8308e9a670db9c01fdf.png"
                class="hover"
              />
            </div>
            <p>手机APP</p>
          </a>
        </li>
        <li>
          <a href="">
            <div class="icon">
              <img
                src="https://i8.mifile.cn/b2c-mimall-media/55cad219421bee03a801775e7309b920.png"
                class="static"
              /><img
                src="https://i8.mifile.cn/b2c-mimall-media/41f858550f42eb1770b97faf219ae215.png"
                class="hover"
              />
            </div>
            <p>个人中心</p>
          </a>
        </li>
        <li>
          <a href="">
            <div class="icon">
              <img
                src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/12eb0965ab33dc8e05870911b90f3f13.png"
                class="static"
              /><img
                src="https://cdn.cnbj1.fds.api.mi-img.com/mi-mall/95fbf0081a06eec7be4d35e277faeca0.png"
                class="hover"
              />
            </div>
            <p>售后服务</p>
          </a>
        </li>
        <li>
          <a href="">
            <div class="icon">
              <img
                src="https://i8.mifile.cn/b2c-mimall-media/4f036ae4d45002b2a6fb6756cedebf02.png"
                class="static"
              /><img
                src="https://i8.mifile.cn/b2c-mimall-media/5e9f2b1b0da09ac3b3961378284ef2d4.png"
                class="hover"
              />
            </div>
            <p>人工客服</p>
          </a>
        </li>
        <li>
          <a href="">
            <div class="icon">
              <img
                src="https://i8.mifile.cn/b2c-mimall-media/d7db56d1d850113f016c95e289e36efa.png"
                class="static"
              /><img
                src="https://i8.mifile.cn/b2c-mimall-media/692a6c3b0a93a24f74a29c0f9d68ec71.png"
                class="hover"
              />
            </div>
            <p>购物车</p>
          </a>
        </li>
        <!-- <li>
          <span></span>
          <p>回顶部</p>
        </li> -->
      </ul>
    </div>
  </body>
</html>
